---
layout: example
categories: example/v1.0.0
version: v1.0.0
title: Add styles made with Mapbox Studio to a Leaflet map
description: Display a style created in Mapbox Studio
tags:
  - leaflet
---
<div id='map'></div>

<script>
var map = L.map('map').setView([38.97416, -95.23252], 15);

// Add tiles from the Mapbox Static Tiles API
// (https://docs.mapbox.com/api/maps/#static-tiles)
// Tiles are 512x512 pixels and are offset by 1 zoom level
L.tileLayer(
    'https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=' + L.mapbox.accessToken, {
        tileSize: 512,
        zoomOffset: -1,
        attribution: '© <a href="https://www.mapbox.com/contribute/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
    }).addTo(map);
</script>
